`include "CP0Defines.svh"
`include "defines.svh"
module IF_ID (
    input logic             clk,
    input logic             reset,
    input logic             IF_ID_Flush,
    input logic             IF_ID_Stall,
    input logic [31:0]      IF_PC,
    input logic [31:0]      IF_NPC,
    input logic [31:0]      IF_Instr,
    input ExceptionType     IF_ExceptionType,
    input PredictResult     IF_PredictResult,

    output logic [31:0]     ID_PC,
    output logic [31:0]     ID_NPC,
    output logic [31:0]     ID_Instr,
    output ExceptionType    ID_ExceptionType,
    output PredictResult    ID_PredictResult
);

    always_ff @(posedge clk,negedge reset)
    begin
        if(!reset||IF_ID_Flush)
        begin
            ID_PC<=32'b0;
            ID_NPC<=32'b0;
            ID_Instr<=32'b0;
            ID_ExceptionType<=`NoException;
            ID_PredictResult<='0;
        end
        else if(!IF_ID_Stall)
        begin
            ID_PC<=IF_PC;
            ID_NPC<=IF_NPC;
            ID_Instr<=IF_Instr;
            ID_ExceptionType<=IF_ExceptionType;
            ID_PredictResult<=IF_PredictResult;
        end
        else 
            ;
    end

endmodule